#ifndef QXGAME_SKILL_H
#define QXGAME_SKILL_H

#include "../base/Object.h"
#include "GameAnimation.h"
#include "SDL_mixer.h"

class Skill : public Object {
public:
    Skill();
    ~Skill() override = default;
    void OnRender() override;
    void OnUpdate(double delta) override;

    virtual bool AiCanRelease(const GameVector& targetPos);
public:
    GameVector direction;
    GameAnimation animation;
    bool needRotate = false;
    double angle = 0;
    double speed = 0;
    double damage = 0;
    int consume = 0;
    bool isCooling = false;
    bool isOnce = true;     // 是否一次性的
    GameTimer timer;            // 冷却时间
    Mix_Chunk *skillMix = nullptr;
};


#endif //QXGAME_SKILL_H
